package com.example.day04;

public class innerDemo {
    public static void main(String[] args) {
        Aoo o1 = new Aoo(){};
//        Aoo o3 = new Boo();
        Boo o3 = new Boo(){
            @Override
            void show() {
                System.out.println("showshowshow");
            }
        };
        o3.show();
        Coo o4 = new Coo(){
            public void say(){
                System.out.println("saysaysay");
            }
        };
        o4.say();
    }
}
//1)Aoo o3 = new Boo();
//2)class Boo extends Aoo{
//
//}等同于Aoo o1 = new Aoo(){};
//class Boo extends Aoo{
//
//}
abstract class Aoo {

}
abstract class Boo {
    abstract void show();
}
interface Coo{
    void say();
}